package br.com.insight.consultoria.entity;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.insight.consultoria.pool.sessionfactory.HibernateUtil;

public class TesteQueryHibernate {
	
	public static void main(String[] args) {
		
		Session session=HibernateUtil.getSessionFactory().openSession();
		Transaction tx=session.beginTransaction();
		List<ConhecimentoLinguaEstrangeira> lista=null;
		String query="from Area a,Tipo t,ConhecimentoUsuario uc where a.id=t.area and t.id=uc.tipo and a.id=1 and uc.usuario=73083887191";
		lista=session.createQuery(query).list();
		
		tx.commit();
		session.close();
		
	}

}
